package com.ktkq.service.checkin.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ktkq.dao.checkin.CheckInMapper;
import com.ktkq.service.checkin.CheckInService;
import com.ktkq.util.PageFinder;
import com.ktkq.util.Pageing;
import com.ktkq.vo.CheckIn;


@Service("checkInService")
@Transactional
public class CheckInServiceImpl implements CheckInService{

	@Autowired
	CheckInMapper checkInMapper;
	
	@Override
	public PageFinder<CheckIn> queryList(Pageing pageing) {
		
		PageFinder<CheckIn> pageFinder = new PageFinder<CheckIn>();
		
		pageFinder.setRowCount(checkInMapper.pageCount(pageing));
		pageFinder.setDataList(checkInMapper.queryList(pageing));
		
		return pageFinder;
	}

	@Override
	public void insert(CheckIn t) {
		
		checkInMapper.insert(t);
	}

	@Override
	public void update(CheckIn t) {
		
		checkInMapper.update(t);
	}

	@Override
	public void delete(CheckIn t) {
		
		checkInMapper.delete(t);
	}

	@Override
	public List<CheckIn> queryListById(int id) {
		
		return checkInMapper.queryById(id);
	}
	
	
}
